from pml import Objects
import decimal

class PMFloatObject(Objects.object.typeobject):
    def __init__(self, value=0):
        super().__init__('float')
        self.value = decimal.Decimal(value)
    def __repr__(self):
        return self.value.__str__()

    def getObject(self):
        self.methods['__init__'] = self.tp_init
        self.methods['__print__'] = self.tp_print

        return self

    @staticmethod
    def tp_init(frame, this, position):
        pass

    @staticmethod
    def tp_print(frame, this, position):
        return this.__repr__()
